class MovieHousesController < ApplicationController
  layout 'admin_layout'
  
  def index
    @movie_houses = Movie_house.find(:all)
  end
  
  def show
    @movie_house = Movie_house.find(params[:id])
  end
  
  def new
    @movie_house = Movie_house.new
  end
  
  def edit
    @movie_house = Movie_house.find(params[:id])
  end
  
  def create
    @movie_house = Movie_house.new(params[:movie_house])
    if @movie_house.save
      flash[:notice] = "The movie house information saved successfully!"
      redirect_to :action => "index"
    else
      render :action => "new"
    end
  end
  
  def update
    @movie_house = Movie_house.find(params[:id])
    if @movie.update_attributes(params[:movie_house])
      flash[:notice] = "The movie house information updated successfully!"
      redirect_to :action => "index"
    else
      redirect_to :back
    end
  end
  
  def destroy
    @movie_house = Movie_house.find(params[:id])
    @movie_house.destroy
    flash[:notice] = "The movie house information destroied successfully!"
    redirect_to :action => "index"
  end
end
